class TeamController < ApplicationController
  # GET /projects/:project_id/team
  def index
	@users = User.find(:all)
	@project = Project.find(params[:project_id])
	render :action => 'index'
  end
	
	# PUT /projects/:project_id/team
	def assign
		params[:user_ids]
		flash[:notice] = "Project members assigned."
		@project = Project.find(params[:project_id])
		@project.users.delete_all
		if not params[:user_ids].blank?
			@project.users << User.find(params[:user_ids])
		end
		redirect_to projects_path
	end
end
